import { createAction, createActions } from 'redux-actions'


export const actionTypes = {
    increase: Symbol('increase'),
    decrease: Symbol('decrease'),
    asyncIncrease: Symbol('asyncIncrease'), // 异步增加
    asyncDecrease: Symbol('asyncDecrease'),
    autoIncrease: Symbol('auto-increase'), // 自动增加
    stopAutoIncrease: Symbol('stop-auto-increase'), // 停止自动增加
    add: Symbol('add'),
}

// export const increase = () => ({ type: actionTypes.increase })
export const decrease = () => ({ type: actionTypes.decrease })
export const asyncIncrease = () => ({ type: actionTypes.asyncIncrease })
export const asyncDecrease = () => ({ type: actionTypes.asyncDecrease })
export const autoIncrease = () => ({ type: actionTypes.autoIncrease })
export const stopAutoIncrease = () => ({ type: actionTypes.stopAutoIncrease })

export const increase = createAction(actionTypes.increase)


// const actions = createActions({
//     [actionTypes.increase]: null, // null 没有payload
//     add: number => number
// })

// console.log(actions);